home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / music / 87 / c / bars.c < prev    next >
C/C++ Source or Header  |  1986-12-19  |  715b  |  29 lines

  1. /* BARS.C    Dan Stubbs    12/5/86                */
  2. /* This program loads the numbers 1000 through 31,000 into     */
  3. /* screen memory one at a time.  Demonstrates speed of loading    */
  4. /* memory on the ST.    Inspired by P. I. Nelson's Neoview    */
  5.  
  6. #include <osbind.h>
  7.  
  8. int  *screen;
  9.  
  10. main()
  11. {
  12.   int i,number;
  13.  
  14.   Cursconf(0,0);         /* This makes cursor disappear     */
  15.  
  16.   screen = (int *) Physbase();    /* Finds address of screen    */
  17.  
  18.   for (number = 1000; number < 32000; number = number + 1000)
  19.     {
  20.       for(i=1; i < 16000; i=i+1)
  21.         {
  22.           *(screen+i)=number;    /* Read number into screen memory*/
  23.         }
  24.     }
  25.  
  26.   Bconin(2);            /* This waits for a key press    */
  27.  
  28. }                 /* The end                      */
  29.